module.exports = function (sequelize, DataTypes) {
    return sequelize.define('user', {
        id: {
            type: DataTypes.INTEGER(11),
            allowNull: false,
            primaryKey: true,
            autoIncrement: true
        },
        openid: {
            type: DataTypes.STRING(128),
            allowNull: false
        },
        nickname: {
            type: DataTypes.STRING(255),
            allowNull: false
        },
        headimg: {
            type: DataTypes.STRING(255),
            allowNull: false
        },
        gender: {
            type: DataTypes.INTEGER(1),
            allowNull: false
        }
    }, {
        freezeTableName: true,
        timestamps: false
    })
}